package com.example.lizhixin.object_three_team.Adapter;

import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.lizhixin.object_three_team.Base.BaseFragment;

import java.util.ArrayList;
import java.util.List;

public class GameViewAdapter extends FragmentPagerAdapter {
     List<BaseFragment> fragArr = new ArrayList<>();
     List<String> strArr = new ArrayList<>();
     public void refrech(List<BaseFragment> fragArr,List<String> strArr){
         this.fragArr = fragArr;
         this.strArr = strArr;
     }

    @Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        return strArr.get(position);
    }

    public GameViewAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int i) {
        return fragArr.get(i);
    }

    @Override
    public int getCount() {
        return fragArr.size();
    }
}
